package com.bawei.mall.user.remote;

import com.bawei.common.core.constant.ServiceNameConstants;
import com.bawei.common.core.domain.R;
import com.bawei.mall.user.domain.CusUser;

import com.bawei.mall.user.factory.RemoteUserInfoFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author DongZl
 * @description: 商品远程调用
 * @Date 2022-10-15 上午 08:40
 */
@FeignClient(contextId = "remoteUserInfoService", value = ServiceNameConstants.USER_SERVICE,
        fallbackFactory = RemoteUserInfoFallbackFactory.class,
        path = "/user")
public interface RemoteUserInfo {

    /**
     * 查询商品信息列表
     */
    @GetMapping("/findByName")
    public R<CusUser> findByName(@RequestParam("username") String username);

}
